package com.controller;

import com.dao.BanksiteDao;
import com.pojo.Banksite;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import tk.mybatis.mapper.entity.Example;

import java.util.List;
import java.util.Map;

@Controller
public class BanksiteController {

    @Autowired
    private BanksiteDao banksiteDao;

    @RequestMapping("/showbanksite.do")
    public String showBanksite(Banksite bs,Map map){
        Example e = new Example(Banksite.class);
        if (bs!=null&&bs.getBid()!=null&&!"".equals(bs.getBid())) {
            e.createCriteria().andEqualTo("bid", bs.getBid());
        }
        List<Banksite> list = banksiteDao.selectByExample(e);
        map.put("list",list);
        return "showBanksite.html";
    }

}
